<template>
  <div>
    <!-- 键盘按下事件修饰符.enter 回车 -->
    <input type="text" @keydown.enter="enterFn">
    <input type="text" @keydown.space="enterFn">
  </div>
</template>

<script>
export default {
  methods: {
    enterFn() {
      console.log('键盘点击了');
    }
  }
}
</script>

<style>

</style>